<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>flex布局-修改主轴方向</title>
  <style>
    .box {
      display: flex;

      /* 修改主轴方向 垂直方向：侧轴自动变换水平方向*/
      flex-direction: column;

      /* 主轴在垂直，视觉效果：垂直居中 */
      justify-content: center;
      /* 侧轴在水平，视觉效果：水平居中 */
      align-items: center;

      width: 150px;
      height: 120px;
      background-color: pink;
    }

    img {
      width: 32px;
      height: 32px;
    }
  </style>
</head>

<body>
  <div class="box">
    <img src="./images/information.png" alt="">
    <span>媒体</span>
  </div>
</body>

</html>